package org.ekstrabilet.main.gui.tabs;

import java.awt.BorderLayout;

import javax.swing.JPanel;
import javax.swing.JTabbedPane;

import org.ekstrabilet.main.gui.panes.Panes;
import org.ekstrabilet.search.gui.SearchPanel;
import org.ekstrabilet.stadium.StadiumViewPane;

/**
 * Guest (View) tab GUI class.
 *
 */
public class GuestTab {
	
	private JPanel pane;
	private JTabbedPane tab;
	private JPanel searchTab;
	private JPanel viewTab;
	
	public GuestTab() {
		tab = new JTabbedPane();
		SearchPanel searchPanel = new SearchPanel();
		searchTab = searchPanel.getPanel();
		viewTab = new StadiumViewPane(false, null);
		searchPanel.setStadiumViewPane((StadiumViewPane)viewTab);
		tab.add(Panes.SEARCH, searchTab);
		tab.add(Panes.VIEW, viewTab);
		
		pane = new JPanel(new BorderLayout(10, 10));
		pane.add(tab);
	}
	
	public JPanel getTab() {
		return pane;
	}
}
